package customtype

import (
	"app/common/funcs"
	"errors"
	"fmt"
)

type IdString string

func (t *IdString) Scan(v interface{}) error {
	fmt.Printf("%+v", v)
	switch vt := v.(type) {
	case int64:
		*t = IdString(funcs.IdEncode(vt))
	default:
		return errors.New("类型处理错误")
	}
	return nil
}
